<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Base;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class SysConfig
 *
 * @property int $id
 * @property string $key 配置键
 * @property string $value 配置值
 * @property string|null $group 配置组
 * @property string|null $memo 备注
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig query()
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereGroup($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereMemo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig whereValue($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|SysConfig withoutTrashed()
 * @mixin \Eloquent
 */
class SysConfig extends Model
{
	use SoftDeletes;
	use HasDateTimeFormatter;
	const ID = 'id';
	const KEY = 'key';
	const VALUE = 'value';
	const GROUP = 'group';
	const MEMO = 'memo';
	const CREATED_AT = 'created_at';
	const UPDATED_AT = 'updated_at';
	const DELETED_AT = 'deleted_at';
	protected $table = 'sys_configs';

	protected $casts = [
		self::ID => 'int',
		self::CREATED_AT => 'datetime',
		self::UPDATED_AT => 'datetime'
	];
}
